typedef struct tws
{
	int array[100];
	int ftop;
	int ttop;
}tws;

Status inistack(tws *T)
{
	T -> ftop = 0;
	T -> ttop = 99;
	memset(T -> array,0,100);
	return OK;
}

Status push(tws *T,int i,int x)
{
	if(i == 0)
	{
		T -> array[T -> ftop] = x;
		T -> ftop++;
	}
	else if(i == 1)
	{
		T -> array[T -> ttop] = x;
		T -> ttop--;
	}
	else
		return ERROR;
	return OK;
}

Status pop(tws *T,int i)
{
	if(i == 0)
	{
		T -> array[T -> ftop] = 0;
		T -> ftop--;
	}
	else
	{
		T -> array[T -> ttop] = 0;
		T -> ttop++;
	}
	return OK;
}


